#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <set>

using namespace std;

bool checkPow2(int num)
{
    return num&&!(num&(num-1));
}

int main(int argc, char **argv)
{
    cout << checkPow2(8) << endl;
    cout << checkPow2(-2) << endl;
    cout << checkPow2(0) << endl;

}
